/* 
 * File:   ServerConfig.cpp
 * Author: dell
 * 
 * Created on 2012年4月2日, 上午11:32
 */

#include "ServerConfig.h"

namespace Rapid{

    ServerConfig::ServerConfig():
        port(DEFAULT_PORT),
        workerCount(DEFAULT_WORKER_COUNT), 
        requestBufferSize(DEFAULT_REQUEST_BUFFER_SIZE), 
        responseBufferSize(DEFAULT_RESPONSE_BUFFER_SIZE), 
        requestLineMaxBytes(DEFAULT_REQUEST_LINE_MAX_BYTES), 
        timeout(DEFAULT_IDLE_TIMEOUT),
        poolMaxHandlerCount(DEFAULT_POOL_MAX_HANDLER_COUNT),
        existEngineConfig(false)
    {


    }

    ServerConfig::~ServerConfig() {
        ContextConfigMap::iterator cxtit = contextConfigMap.begin();
        for(; cxtit != contextConfigMap.end();){
            ContextConfig* contextConfig = cxtit->second;
            //LOG_DEBUG("contextConfig->name:%s", contextConfig->name.c_str());
            contextConfigMap.erase(cxtit++);
            delete contextConfig;

        }    
        contextConfigMap.clear();
    }

}


